﻿using System;
using System.ComponentModel;
using System.Data;
using System.Windows;
using WPFExcelReport.Helpers;
using System.Windows.Controls;
using ReflectionStudio.Core.Events;
namespace WPFExcelReport
{
    /// <summary>
    /// 发货单与运输单号关系
    /// </summary>
    public partial class TXSGB14 
    {
        ITXEXRPT ITXEXRPT;
        #region ==FROMDATE===========
        public static readonly DependencyProperty FROMDATEProperty = DependencyProperty.Register("FROMDATE",
            typeof(string), typeof(TYLGB14),
            new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnFROMDATEChanged));
        public string FROMDATE
        {
            get
            {
                return (string)GetValue(FROMDATEProperty);
            }
            set
            {
                SetValue(FROMDATEProperty, value);
            }
        }
        private static void OnFROMDATEChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            var src = sender as TYLGB14;
            if (src != null)
            {
                src.FROMDATE = (string)e.NewValue;
            }
        }
        #endregion
        private void FROM_DATE_SelectedDateChanged(object sender, SelectionChangedEventArgs e)
        {
            try
            {
                FROMDATE = "";
                FROMDATE = Helpers.Helper.GetDate(sender);
            }
            catch (Exception ex)
            {
                Tracer.Error(ex.StackTrace, ex);
            }

        }
        public TXSGB14()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VGABEW();
            this.DataContext = MV;
            InitializeComponent();
        }
       
    }
}